Package-level declarations

Types

Link copied to clipboard
interface AngularAxisModel<T>

An interface for classes representing the angular axis on a polar plot.

Link copied to clipboard
data class AngularValueAxisModel(tickValues: List<AngularValue> = buildList { @Suppress("MagicNumber") for (i in 0..<8) { add((PI * i / 4.0).rad) } }, val angleDirection: AngularAxisModel.AngleDirection = AngularAxisModel.AngleDirection.COUNTERCLOCKWISE, val angleZero: AngularAxisModel.AngleZero = AngularAxisModel.AngleZero.THREE_OCLOCK) : AngularAxisModel<AngularValue>

An AngularAxisModel that uses AngularValues of either Radians or Degrees.

Link copied to clipboard
data class CategoryAngularAxisModel<T>(categories: List<T>, val angleDirection: AngularAxisModel.AngleDirection = AngularAxisModel.AngleDirection.CLOCKWISE, val angleZero: AngularAxisModel.AngleZero = AngularAxisModel.AngleZero.TWELVE_OCLOCK) : AngularAxisModel<T>

An AngularAxisModel that uses category values evenly spaced around the perimeter of the Polar plot. Values plotted on this axis can only exactly match one of the category values.

Link copied to clipboard
data class DefaultPolarPoint<R, T>(val r: R, val theta: T) : PolarPoint<R, T>

Default implementation of the PolarPoint interface.

Link copied to clipboard

A model for a radial axis that uses Float values and is linear.

Link copied to clipboard

Contains default values for PolarGraphs.

Link copied to clipboard
data class PolarGraphProperties(val radialGridType: RadialGridType, val radialAxisGridLineStyle: LineStyle?, val angularAxisGridLineStyle: LineStyle?, val angularLabelGap: Dp, val radialLabelGap: Dp, val background: AreaStyle?)

Properties used to customize the visuals and layout of a PolarGraph.

Link copied to clipboard

Scope for plot series content placed on a PolarGraph.

Link copied to clipboard
interface PolarPoint<R, T>

Represents a point on a 2-d polar plot.

Link copied to clipboard
interface RadialAxisModel<T>

A model for a radial axis that transforms from axis space to drawing space.

Link copied to clipboard

An enum class to specify how the radial axis grid lines are drawn. CIRCLES will draw the grid lines as concentric circles of different radii, whereas LINES will draw them as straight lines between consecutive angular axis grid lines.

Functions

Link copied to clipboard
fun <T> PolarGraph(radialAxisModel: FloatRadialAxisModel, angularAxisModel: AngularAxisModel<T>, radialAxisLabelText: (Float) -> String = { it.toString() }, angularAxisLabelText: (T) -> String = { it.toString() }, modifier: Modifier = Modifier, polarGraphProperties: PolarGraphProperties = PolarGraphDefaults.PolarGraphPropertyDefaults(), content: @Composable PolarGraphScope<T>.() -> Unit)
fun <T> PolarGraph(radialAxisModel: FloatRadialAxisModel, angularAxisModel: AngularAxisModel<T>, radialAxisLabels: @Composable (Float) -> Unit, angularAxisLabels: @Composable (T) -> Unit, modifier: Modifier = Modifier, polarGraphProperties: PolarGraphProperties = PolarGraphDefaults.PolarGraphPropertyDefaults(), content: @Composable PolarGraphScope<T>.() -> Unit)

A Graph using polar coordinates - a radial axis and an angular axis. Multiple series of data can be plotted on a polar graph as lines and/or shaded regions with or without symbols at each plotted point.

Link copied to clipboard
fun <T> PolarGraphScope<T>.PolarPlotSeries(data: List<PolarPoint<Float, T>>, modifier: Modifier = Modifier, lineStyle: LineStyle? = null, areaStyle: AreaStyle? = null, symbols: @Composable HoverableElementAreaScope.(PolarPoint<Float, T>) -> Unit? = null, animationSpec: AnimationSpec<Float> = KoalaPlotTheme.animationSpec)

Plots a series on a PolarGraph.

Link copied to clipboard
fun <R, T> PolarPoint(r: R, theta: T): PolarPoint<R, T>

Creates a new DefaultPolarPoint at the specified coordinates.

Link copied to clipboard
fun rememberAngularValueAxisModel(tickValues: List<AngularValue> = buildList { @Suppress("MagicNumber") for (i in 0..<8) { add((PI * i / 4.0).rad) } }, angleDirection: AngularAxisModel.AngleDirection = AngularAxisModel.AngleDirection.COUNTERCLOCKWISE, angleZero: AngularAxisModel.AngleZero = AngularAxisModel.AngleZero.THREE_OCLOCK): AngularValueAxisModel
Link copied to clipboard
fun <T> rememberCategoryAngularAxisModel(categories: List<T>, angleDirection: AngularAxisModel.AngleDirection = AngularAxisModel.AngleDirection.CLOCKWISE, angleZero: AngularAxisModel.AngleZero = AngularAxisModel.AngleZero.TWELVE_OCLOCK): CategoryAngularAxisModel<T>

Creates and remembers a CategoryAngularAxisModel.